"Colin's diff functionality vimrc

"Reminder - to use vim for WinCVS diff, copy gvim.exe to gviewdiff.exe
"           and use that for the external diff program.  This will cause vim to
"           execute with the GUI, in diff mode, and view mode (which avoids the
"           swapfile warning).

"map to make it easier to enable diffs
nmap ,d :diffthis<CR>
"Ignore white space
nmap ,i :set diffopt+=iwhite<CR>

"Function to restore options set by diff mode to their default values
function! TurnOffDiffMode()
   diffoff
   "Restore these options to their default values
   "set diff&
   "set scrollbind&
   "set scrollopt&
   "set wrap&
   "set foldmethod&
   "set foldcolumn&

   "Open all folds
   normal zE
endfunction
command! NoDiffThis :call TurnOffDiffMode()

